package com.bosssoft.gateway.authentication.api.controller;

import com.bosssoft.gateway.authentication.api.AuthenticationApi;
import com.bosssoft.gateway.authentication.pojo.query.LoginQuery;
import com.bosssoft.gateway.authentication.service.AuthenticationService;
import common.data.commonresponse.CommonResponse;
import common.util.CommonResponseUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: AuthenticationController
 * @description: 认证服务控制层，实现API接口
 * @author: lanyukai
 * @date: 2024/6/19 17:05
 * @since 1.0
 **/
@RestController
public class AuthenticationController implements AuthenticationApi {
    /**
     * 认证业务层
     */
    @Autowired
    AuthenticationService authenticationService;
    @Override
    public CommonResponse<String> doAuth(LoginQuery loginQuery) {
        return CommonResponseUtils.success(authenticationService.doAuth(loginQuery));
    }
}
